import axiosInstance from "../utils/axios.ts";
import type {MyResponse} from "../types";

export const deleteFile = (path: string) => {
  return axiosInstance.delete<any, MyResponse<boolean>>("/file/deleteFile", {
    params: {
      path: path
    }
  })
}

export const downloadFile = (path: string) => {
  return axiosInstance.get("/file/download", {
    params: {
      filePath: path
    },
    responseType: "blob"
  })
}